class DatumItem {
    
    ///小区楼栋信息
    String building;
    
    ///业主性别0女1男
    double gender;
    
    ///id
    String id;
    
    ///业主电话
    String mobile;
    
    ///业主姓名
    String name;
    
    ///小区信息
    String point;
    
    ///小区房间信息
    String room;
    
    ///审核状态1审核中2审核成功3审核失败
    double status;

    DatumItem({
        required this.building,
        required this.gender,
        required this.id,
        required this.mobile,
        required this.name,
        required this.point,
        required this.room,
        required this.status,
    });

    // 工厂方法，从json创建对象
    factory DatumItem.fromJson(Map<String, dynamic> json) {
        return DatumItem(
            building: json['building'] ?? '',
            gender: json['gender']?.toDouble() ?? 0.0,
            id: json['id'] ?? '',
            mobile: json['mobile'] ?? '',
            name: json['name'] ?? '',
            point: json['point'] ?? '',
            room: json['room'] ?? '',
            status: json['status']?.toDouble() ?? 0.0,
        );
    }

    // 转换为json的方法
    Map<String, dynamic> toJson() => {
        'building': building,
        'gender': gender,
        'id': id,
        'mobile': mobile,
        'name': name,
        'point': point,
        'room': room,
        'status': status,
    };

}